{include file="file:$theme_global/_header.tpl"}

<div id="main">
	<div class="main">
		<div class="sec">
			<div class="title"><h1>{$pagetitle}</h1></div>
			<div class="inner">
				{include file="file:$theme_global/_messages.tpl"}
				{if count($requests) gt 0}
				<ul class="thumbs-e">
				  {foreach from=$requests item=user}
				  <li>
					  <a href="{url}/profile/{$user.friend_username}{/url}" title="{$user.friend_username}"><img src="/displayimage/{$user.friend_username}/original/70/70/1/jpg/avatar" alt="" height="78" width="78" /></a>
					  <h4><a href="{url}/profile/{$user.friend_username}{/url}" title="{$user.friend_username}">{$user.friend_username}</a></h4>
					  <p>Request received on <em>{$user.invited_on|date_format:$format_date}</em></p>
					  <form method="post" action="{url}/friends/index/requests{/url}" enctype="multipart/form-data">
					  <div class="submit-alt">
						<input type="hidden" name="approve" value="{$user.friend_username}"/>
						<button type="submit" value="Approve" class="approve">Approve</button>
					  </div>
					  </form>
					  <form method="post" action="{url}/friends/index/requests{/url}" enctype="multipart/form-data">
					  <div class="submit-alt">
						<input type="hidden" name="reject" value="{$user.friend_username}"/>
						<button type="submit" value="Reject" class="reject">Reject</button>
				      </div>
					  </form>		  
				  </li>
				  {/foreach}
				</ul>	
				{else}
				<p class="alt">You do not have any pending friend requests to approve or reject.</p>	
				{/if}
			</div>
		</div>
	</div>

</div>
{include file="file:$theme_global/_footer.tpl"}